package org.jsbd.boss.dao.impl;

import java.util.HashMap;
import java.util.Map;

import org.jsbd.boss.common.DataGridModel;
import org.jsbd.boss.dao.ITaskReturnDAO;
import org.jsbd.boss.domian.statistics.TaskReturnStatistics;
import org.springframework.stereotype.Repository;

@Repository("taskReturnDao")
public class TaskReturnDAOImpl extends CrackStatisticsBaseDao implements ITaskReturnDAO {

	@Override
	public Map<String, Object> selectTaskReturnPageList(DataGridModel page, TaskReturnStatistics taskReturnStatistics) {
		taskReturnStatistics = (taskReturnStatistics == null ? new TaskReturnStatistics() : taskReturnStatistics);
		taskReturnStatistics.setPageInfo(page);
	    Map<String, Object> results = new HashMap<String, Object>();
	    results.put("rows", super.queryForList("qy_task_return.SELECT_TASK_RETURN_PAGE_LIST", taskReturnStatistics));
	    results.put("total", super.queryForCount("qy_task_return.SELECT_TASK_RETURN_PAGE_COUNT", taskReturnStatistics));
	    return results;
	}

}
